package com.yanqu.road.server.cmd.activity.peakstronghold;

import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.pb.activity.PeakStrongholdWarProto;
import com.yanqu.road.server.cmd.CrossCommand;
import com.yanqu.road.server.cmd.CrossUnionCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.manager.peakstronghold.CrossPeakStrongholdMgr;
import com.yanqu.road.server.manager.peakstronghold.PeakStrongholdActivityModel;
import com.yanqu.road.server.protocol.Protocol;

@Cmd(code = Protocol.C_PEAK_STRONGHOLD_MEMBER_DONATE_EXP_LIST, desc = "查看商会成员捐献明细")
public class CrossPeakStrongholdMemberDonateDetailCmd extends CrossUnionCommand {

    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        return true;
    }

    @Override
    public void execute(YanQuMessage packet) throws Exception {
        PeakStrongholdWarProto.CrossPeakHoldMemberDonateDetailReqMsg reqMsg = PeakStrongholdWarProto.CrossPeakHoldMemberDonateDetailReqMsg.parseFrom(packet.getBytes());
        PeakStrongholdActivityModel activityModel = CrossPeakStrongholdMgr.getActivityModel(reqMsg.getActivityId(), groupId);
        if(activityModel != null){
            activityModel.sendUnionMemberDonateExpList(serverId, packet.getPlayerId(), reqMsg.getUnionId());
        }
    }

    @Override
    public void sendData() {

    }
}
